#!/usr/bin/env python

import sys
import datetime
from datetime import *

now = datetime.now()
format = '%Y-%m-%d %H:%M:%S'
start_datetime = None
if len(sys.argv) > 1:
	parts = sys.argv[1].split('.')
	start_datetime = datetime.strptime(parts[0], format)
	start_datetime.replace(microsecond=int(parts[1]))
	diff = now - start_datetime
	m = diff.microseconds + diff.seconds * 1000000 + diff.days * 1000000 * 60 * 60 * 24
	print(m)
else:
	print('%s.%s' % (now.strftime(format), now.microsecond))
